<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            width: 300px;
            height: 300px;
            margin: 200px auto;
            /* perspective: 3000px; */
            transform-style: preserve-3d;
            transition: all 2s;
            transform: rotateY(180deg)
        }
        
        .box .box2 {
            left: 0;
            top: 0;
            position: absolute;
            border-radius: 50%;
            height: 100%;
            width: 100%;
            border: 3px solid skyblue;
        }
        
        .box .box3 {
            transform: rotateX(45deg);
            position: absolute;
            border-radius: 50%;
            height: 100%;
            width: 100%;
            border: 3px solid lightcoral;
        }
        
        .box .box4 {
            transform: rotateX(-45deg);
            position: absolute;
            border-radius: 50%;
            height: 100%;
            width: 100%;
            border: 3px solid red;
        }
        
        .box .box5 {
            transform: rotateX(80deg);
            position: absolute;
            border-radius: 50%;
            height: 100%;
            width: 100%;
            border: 3px solid greenyellow;
        }
        
        .box:hover {
            transform: rotateY(360deg) rotateX(360deg)
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
        <div class="box5"></div>
    </div>
</body>

</html>